# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-mysqlclient
pkgver=1.4.6
pkgrel=0
pkgdesc="MySQL database connector for Python (with py3 support)"
url="https://mysqlclient.readthedocs.io/"
arch="all"
license="GPL-2.0"
makedepends="python3-dev py3-setuptools mariadb-dev"
source="mysqlclient-python-$pkgver.tar.gz::https://github.com/PyMySQL/mysqlclient-python/archive/v$pkgver.tar.gz"
builddir="$srcdir/mysqlclient-python-$pkgver"

replaces="py-mysqlclient" # Backwards compatibility
provides="py-mysqlclient=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	CFLAGS="$CFLAGS -I/usr/include/mysql" python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="39e0623026b39ef777035e91b326912f2e477314901aafe2869774e0790c18a607b9c6ae0526c0263908a7ea73e21d0399daf8987f122d0b5a7902d4cd7d6a14  mysqlclient-python-1.4.6.tar.gz"
